//
//  XWCommonButton.m
//  CGWSWW
//
//  Created by lanou3g on 16/8/14.
//  Copyright © 2016年 CXG. All rights reserved.
//

#import "XWCommonButton.h"
#import "UIView+XWExtension.h"
@implementation XWCommonButton

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        
        [self.titleLabel setTextAlignment:(NSTextAlignmentCenter)];
        [self setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    }
    return self;
}
-(void)layoutSubviews{
    [super layoutSubviews];
    self.imageView.layer.cornerRadius = self.imageView.XW_width/2;
    self.imageView.layer.masksToBounds =YES;
    
    self.imageView.frame = CGRectMake(10, 0, self.XW_width-20, self.XW_high*0.8);
    self.titleLabel.frame = CGRectMake(0, self.imageView.XW_bottom, self.XW_width, self.XW_high*0.2);
}
-(void)setHighlighted:(BOOL)highlighted{
    
}
@end
